/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package server;

import java.rmi.Naming;

/**
 *
 * @author devsdr
 */
public class Client {

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        try {
            Monitoring obj = (Monitoring) Naming.lookup("//localhost/MonitoringServer");
         
            System.out.println("Charge CPU : "+obj.getServerHealth().getCpuLoad()+" %");
            System.out.println("Memoire libre : "+obj.getServerHealth().getMemory()+" kB");
            System.out.println("Nombre de tache en cours : "+obj.getServerHealth().getTasks().size());
        } catch (Exception e) {
            System.out.println("Client err: " + e.getMessage());
            e.printStackTrace();
        }
    }
}
